package com.auxgroup.hr.front.site.vo.process;

import com.auxgroup.hr.front.commons.utils.DateUtils;
import com.auxgroup.hr.front.dao.domain.PsCWfPlaveHdr;

import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by nitongqian on 2019/3/8.
 */
public class WfPlaveLsVO {

    private String cWfStatus;//	流程状态	CHAR
    private String cTransactionNbr;//流程编号
    private String cWfAppDt;
    private String laveDate;
    private String typeStr;

    private String cWfTitle;
    private String cLeaveType;
    private BigDecimal cLeaveDays;

    public WfPlaveLsVO(){}
    public WfPlaveLsVO(PsCWfPlaveHdr plave, String typeStr) {
        this.cWfStatus = plave.getcWfStatus();
        this.cTransactionNbr = plave.getcTransactionNbr();
        this.cWfAppDt = DateUtils.format(plave.getcWfAppDt(), "yyyy-MM-dd");
        String startD = plave.getStartDate() == null ? "" : DateUtils.format(plave.getStartDate(), "yyyy-MM-dd");
        String endD = plave.getEndDate() == null ? "" : DateUtils.format(plave.getEndDate(), "yyyy-MM-dd");
        this.laveDate = "Y".equalsIgnoreCase(plave.getcLeaveType()) ? startD + "  " + endD : startD;
        this.typeStr = typeStr;
        this.cLeaveDays = plave.getcLeaveDays();
        this.cLeaveType = plave.getcLeaveType();
    }

    public String getcWfTitle() {
        return cWfTitle;
    }

    public void setcWfTitle(String cWfTitle) {
        this.cWfTitle = cWfTitle;
    }

    public String getcLeaveType() {
        return cLeaveType;
    }

    public void setcLeaveType(String cLeaveType) {
        this.cLeaveType = cLeaveType;
    }

    public BigDecimal getcLeaveDays() {
        return cLeaveDays;
    }

    public void setcLeaveDays(BigDecimal cLeaveDays) {
        this.cLeaveDays = cLeaveDays;
    }

    public String getcWfStatus() {
        return cWfStatus;
    }

    public void setcWfStatus(String cWfStatus) {
        this.cWfStatus = cWfStatus;
    }

    public String getcTransactionNbr() {
        return cTransactionNbr;
    }

    public void setcTransactionNbr(String cTransactionNbr) {
        this.cTransactionNbr = cTransactionNbr;
    }

    public String getcWfAppDt() {
        return cWfAppDt;
    }

    public void setcWfAppDt(String cWfAppDt) {
        this.cWfAppDt = cWfAppDt;
    }

    public String getLaveDate() {
        return laveDate;
    }

    public void setLaveDate(String laveDate) {
        this.laveDate = laveDate;
    }

    public String getTypeStr() {
        return typeStr;
    }

    public void setTypeStr(String typeStr) {
        this.typeStr = typeStr;
    }
}
